<template>
	<z-paging ref="paging" v-model="list" @query="getList">
		<template>
			<view class="d-p-l-30 d-p-r-30">
				<view class="d-list-box d-m-t-20 d-p-20 d-flex d-col-top" v-for="(item, index) in list" :key="index"
					@click="ticketDetail(item.id)">
					<u-image :src="item.picture" width="200rpx" height="148rpx"></u-image>
					<view class="d-m-l-20 d-flex-1">
						<!-- <view class="d-m-t-60 d-font-30 d-red">
							<text class="d-font-24">￥</text>
							<text class="d-bold">80</text>
						</view> -->
						<view class="d-font-40 d-white d-bold">{{item.vname}}</view>
						<view class="d-font-28 d-red">{{item.content}}</view>
						<view class="d-font-28 d-red">{{item.sale_tip}}</view>
						<view class="d-font-28 d-white">{{item.mobile}}</view>
						<view class="d-m-t-60 d-font-30 d-black">
							<image src="../../static/home.png" mode="" style="width: 25rpx;height: 25rpx;"></image>
							<text class="d-bold">{{item.address}}</text>
						</view>
						<!-- <view class="d-flex d-m-t-18">
							<view class="d-tag d-flex">{{ item.specify }}</view>
						</view>
						<view class="d-font-24 d-be d-m-t-20">{{ item.tip }}</view>
						<view class="d-font-24 d-be d-m-t-20" style="margin-left: 47rpx;">{{ item.text }}</view> -->

					</view>
				</view>
			</view>
		</template>
	</z-paging>
</template>

<script>
	import { venuelist } from '@/common/api';
	export default {
		data() {
			return {
				list: []
			};
		},
		onLoad(e) {
			console.log(uni.getStorageSync('token'),'[[[]]]')
			// if (!uni.getStorageSync('token')) {
			// 	uni.navigateTo({
			// 		url: '/pages/login/login'
			// 	})
			// }
		},
		methods: {
			getList() {
				venuelist()
					.then(res => {
						this.$refs.paging.complete(res);
					})
					.catch(err => {
						this.$refs.paging.complete(false);
					});
			},
			setCurrent(e) {
				this.current = e.index;
				this.$refs.paging.reload(false);
			},
			ticketDetail(id) {
				uni.setStorageSync('venue_id',id)
				uni.switchTab({
					url: '/pages/home/home'
				})
			},
			cardDetail(id) {
				uni.$u.route({
					url: '/pages/home/cardDetail',
					params: {
						id
					}
				});
			}
		}
	};
</script>

<style lang="scss" scoped>
	.d-list-box {
		box-shadow: 0rpx 13rpx 57rpx 0rpx rgba(8, 73, 162, 0.11);
		background: #ffffff;
		border-radius: 10rpx;
	}

	.d-tag {
		background: #f3f3f3;
		border-radius: 4rpx;
		height: 36rpx;
		font-size: 24rpx;
		font-weight: 500;
		color: #333333;
		padding: 0 18rpx;
	}

	.d-be {
		color: #bebebe;
	}

	.d-red {
		color: #ff0000;
		margin-top: 10rpx !important;
	}

	.d-black {
		color: #000000;
		margin-top: 10rpx !important;
	}

	.d-white {
		color: #000000;
		margin-top: 10rpx !important;
	}

	.d-bold {
		font-weight: bold;

	}
</style>